package com.ruoyi.base.service;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.base.domain.SSerial;
import com.ruoyi.common.annotation.CompanyScope;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.domain.R;

import java.util.List;

public interface ISSerialService extends IService<SSerial> {

    @CompanyScope
    @Override
    default List<SSerial> list(Wrapper<SSerial> queryWrapper) {
        return IService.super.list(queryWrapper);
    }

    List<SSerial> selectSSerialList(SSerial sSerial);

    R insertSSerial(SSerial sSerial) throws Exception;

    AjaxResult updateSSerial(SSerial sSerial);

    int getSerialByCode(String code);

    String getSerialNumberByCodeDept(String code, String deptId);

    String getSerialNumberByCode(String code);

    String getSerialNumberByCodeDeptYearType(String code, String deptId, Long year, String spType) throws Exception;

    String getSerialNumberByCodeDeptYear(String code, String deptId, Long contractYear) throws Exception;

    void updateSerialCron(String type);
}
